﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using XChip_Common;

namespace XChipTool
{
    public partial class XChip_VersionPassWord : DevExpress.XtraEditors.XtraForm
    {
        public XChip_VersionPassWord()
        {
            InitializeComponent();
        }

        private void simpleButton1_Click(object sender, EventArgs e)
        {
            if (pwd_txt.Text.ToLower() == "xchip")
            {
                AppHelper.UpdateAppConfig("xcEdition", "0");
                // DevExpress.XtraEditors.XtraMessageBox.Show("可用端口未打开");
                //--------------重启软件 start---------------
                //开启新的实例
                System.Diagnostics.Process.Start(Application.ExecutablePath);
                //关闭当前实例
                System.Diagnostics.Process.GetCurrentProcess().Kill();
                //--------------重启软件 end----------------- 
            }
        }
    }
}